import React from 'react'
import {BrowserRouter as Router, Switch, Route} from 'react-router-dom'
import { ConfigProvider } from 'antd'
import zh_CN from 'antd/lib/locale-provider/zh_CN'
import Play from './Play'
import NamePicExam from './NamePicExam'
import PicNameExam from './PicNameExam'
import ExamResult from './ExamResult'
import Entry from './Entry'
import Bedge from './Bedge'

const Root = () => (
  <Router basename="/soft192">
    <ConfigProvider locale={zh_CN}>
      <Switch>
        <Route path="/" exact component={Entry}/>
        <Route path="/play" exact component={Play}/>
        <Route path="/name_to_pic" exact component={NamePicExam}/>
        <Route path="/pic_to_name" exact component={PicNameExam}/>
        <Route path="/result/:wrongs/:questions" component={ExamResult}/>
        <Route path="/bedge" exact component={Bedge}/>
      </Switch>
    </ConfigProvider>
  </Router>
)

export default Root
